package com.itheima.static_case.Demo6;

public class Dog extends Animal {
    private String color;

    public Dog() {
    }

    public Dog(String color) {
        this.color = color;
    }

    public void print() {
        System.out.println("这是狗，name: " + this.getName() + "颜色：" + this.getColor());
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
}
